package com.icss.flow.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Administrator
 */

@AllArgsConstructor
@Getter
public enum ModeEnum {
    OR("or", " or %s"), AND("and", " and %s");
    private final String mode;
    private final String template;

    public static ModeEnum getMode(String extName) {
        for (ModeEnum value : ModeEnum.values()) {
            if (value.getMode().equalsIgnoreCase(extName)) {
                return value;
            }
        }
        return OR;
    }
}
